package com.shop.admin.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.shop.admin.valid.AddGroup;
import com.shop.admin.valid.UpdateGroup;
import lombok.Data;
import org.hibernate.validator.constraints.URL;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * (ShopImage)实体类
 *
 * @author makejava
 * @since 2022-09-02 21:40:36
 */
@Data
@TableName("shop_image")
public class ShopImage implements Serializable {
    private static final long serialVersionUID = 807232528779287717L;
    /**
     * id
     */
    private Long id;
    /**
     * 图片id
     */
    private Long orderId;
    /**
     * 图片地址
     */
    @NotBlank(groups = {AddGroup.class})
    @URL(message = "图片必须是一个合法的url地址",groups={AddGroup.class, UpdateGroup.class})
    private String imgUrl;
    /**
     * 默认图[0 - 不是默认图，1 - 是默认图]
     */
    private Integer defaultImg;



}

